package com.example.travel.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.travel.R;

public class FistContactFragment extends Fragment {
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.shouye,container,false);
        Button button = view.findViewById(R.id.bt1);
        TextView tv1=view.findViewById(R.id.tv1);

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Fragment search_travel_fragment2 =new search_travel_fragment2();
                getFragmentManager().beginTransaction().replace(R.id.flconent, search_travel_fragment2)
                        .commit();
            }
        });

        tv1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent();
                intent.setClassName("com.example.travel","com.example.travel.activity.WebActivity");
                startActivity(intent);
            }
        });

        return view;
    }
}

